<?php
/**
 * CodeXplorer System
 *
 * ABSTRACT
 *
 * This DB class defines the functions that all DB classes should use. 
 * This class MUST be extended as it does nothing on it's own.
 *
 * @package    /includes/kits/db.kit.php
 * @version    1.0.0 <4/5/2008>
 * @author     David Pennington <@codexplorer.com>
 * @copyright  Copyright (c) 2008 CodeXplorer <http://www.codexplorer.com>
 * @license    http://www.gnu.org/licenses/gpl-3.0.html (GPL v3)
 *
 ********************************** 80 Columns *********************************
 */



abstract class cx_db {
    
    var $db_type = null;
    var $db_user = null;
    var $db_pass = null;
    var $db_name = null;
    var $db_host = null;
    
    var $result         = null;
    var $db_handle      = null;
    var $db_persistent  = null;
    var $total_queries  = 0;
    var $error          = 'Database Class Not Set';
    
    //var $errors         = array();
    //var $last_action    = null;
    //var $version        = 1;

    ///////////////////////////////////////////////////
    // Constructor
    public function cx_db() {}


    ///////////////////////////////////////////////////
    // Connect to DB 
    public function connect() {
    	trigger_error($this->error);
    }

    ///////////////////////////////////////////////////
    // Close a DB connection 
    public function close() {
    	trigger_error($this->error);
    }

    ///////////////////////////////////////////////////
    // Select a DB 
    public function select() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Return databases on the server
    public function database() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Return array of tables in database
    public function tables() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Return array of columns and their information 
    public function columns() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Return array of columns and their information 
    public function fields() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Number of columns in a query 
    public function number_of_fields() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Query Database
    public function query() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Return query result row
    public function fetch() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Return query result value
    public function fetch_value() {
    	trigger_error($this->error);
    }
    
    
    ///////////////////////////////////////////////////
    // Number of DB rows affected by last query 
    public function affected_rows() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Number of DB rows found by last query 
    public function found_rows() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // ID generated from the last operation 
    public function last_row_id() {
    	trigger_error($this->error);
    }
    

    ///////////////////////////////////////////////////
    // Format a string correctly for safe insert
    public function escape() {
    	trigger_error($this->error);
    }


    ///////////////////////////////////////////////////
    // Kill cached variables
    public function clean() {
    	trigger_error($this->error);
    }
    
    
    ///////////////////////////////////////////////////
    // Do some last functions before closing
    public function __destruct () {
        
    }
}

?>